Optimal. Leaf size=372 \[ \frac {\sin (c+d x) \cos ^3(c+d x) \left (5 a^2 (5 A+6 C)+48 a b B+12 A b^2\right ) (a+b \sec (c+d x))^2}{120 d}+\frac {a \sin (c+d x) \cos ^2(c+d x) \left (16 a^3 B+a^2 b (39 A+50 C)+36 a b^2 B+4 A b^3\right )}{60 d}+\frac {\sin (c+d x) \left (8 a^4 B+8 a^3 b (4 A+5 C)+60 a^2 b^2 B+20 a b^3 (2 A+3 C)+15 b^4 B\right )}{15 d}+\frac {\sin (c+d x) \cos (c+d x) \left (15 a^4 (5 A+6 C)+360 a^3 b B+10 a^2 b^2 (49 A+66 C)+336 a b^3 B+24 A b^4\right )}{240 d}+\frac {1}{16} x \left (a^4 (5 A+6 C)+24 a^3 b B+12 a^2 b^2 (3 A+4 C)+32 a b^3 B+8 b^4 (A+2 C)\right )+\frac {(3 a B+2 A b) \sin (c+d x) \cos ^4(c+d x) (a+b \sec (c+d x))^3}{15 d}+\frac {A \sin (c+d x) \cos ^5(c+d x) (a+b \sec (c+d x))^4}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.21, antiderivative size = 372, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {4094, 4074, 4047, 2637, 4045, 8} \[ \frac {\sin (c+d x) \left (8 a^3 b (4 A+5 C)+60 a^2 b^2 B+8 a^4 B+20 a b^3 (2 A+3 C)+15 b^4 B\right )}{15 d}+\frac {a \sin (c+d x) \cos ^2(c+d x) \left (a^2 b (39 A+50 C)+16 a^3 B+36 a b^2 B+4 A b^3\right )}{60 d}+\frac {\sin (c+d x) \cos (c+d x) \left (10 a^2 b^2 (49 A+66 C)+15 a^4 (5 A+6 C)+360 a^3 b B+336 a b^3 B+24 A b^4\right )}{240 d}+\frac {\sin (c+d x) \cos ^3(c+d x) \left (5 a^2 (5 A+6 C)+48 a b B+12 A b^2\right ) (a+b \sec (c+d x))^2}{120 d}+\frac {1}{16} x \left (12 a^2 b^2 (3 A+4 C)+a^4 (5 A+6 C)+24 a^3 b B+32 a b^3 B+8 b^4 (A+2 C)\right )+\frac {(3 a B+2 A b) \sin (c+d x) \cos ^4(c+d x) (a+b \sec (c+d x))^3}{15 d}+\frac {A \sin (c+d x) \cos ^5(c+d x) (a+b \sec (c+d x))^4}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2637
Rule 4045
Rule 4047
Rule 4074
Rule 4094
Rubi steps
\begin {align*} \int \cos ^6(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}+\frac {1}{6} \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (2 (2 A b+3 a B)+(5 a A+6 b B+6 a C) \sec (c+d x)+b (A+6 C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {(2 A b+3 a B) \cos ^4(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d}+\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}+\frac {1}{30} \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (12 A b^2+48 a b B+5 a^2 (5 A+6 C)+2 \left (12 a^2 B+15 b^2 B+a b (23 A+30 C)\right ) \sec (c+d x)+3 b (3 A b+2 a B+10 b C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {\left (12 A b^2+48 a b B+5 a^2 (5 A+6 C)\right ) \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{120 d}+\frac {(2 A b+3 a B) \cos ^4(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d}+\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}+\frac {1}{120} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \left (6 \left (4 A b^3+16 a^3 B+36 a b^2 B+a^2 b (39 A+50 C)\right )+\left (264 a^2 b B+120 b^3 B+15 a^3 (5 A+6 C)+8 a b^2 (32 A+45 C)\right ) \sec (c+d x)+b \left (72 a b B+24 b^2 (2 A+5 C)+5 a^2 (5 A+6 C)\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a \left (4 A b^3+16 a^3 B+36 a b^2 B+a^2 b (39 A+50 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {\left (12 A b^2+48 a b B+5 a^2 (5 A+6 C)\right ) \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{120 d}+\frac {(2 A b+3 a B) \cos ^4(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d}+\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}-\frac {1}{360} \int \cos ^2(c+d x) \left (-3 \left (24 A b^4+360 a^3 b B+336 a b^3 B+15 a^4 (5 A+6 C)+10 a^2 b^2 (49 A+66 C)\right )-24 \left (8 a^4 B+60 a^2 b^2 B+15 b^4 B+20 a b^3 (2 A+3 C)+8 a^3 b (4 A+5 C)\right ) \sec (c+d x)-3 b^2 \left (72 a b B+24 b^2 (2 A+5 C)+5 a^2 (5 A+6 C)\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a \left (4 A b^3+16 a^3 B+36 a b^2 B+a^2 b (39 A+50 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {\left (12 A b^2+48 a b B+5 a^2 (5 A+6 C)\right ) \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{120 d}+\frac {(2 A b+3 a B) \cos ^4(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d}+\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}-\frac {1}{360} \int \cos ^2(c+d x) \left (-3 \left (24 A b^4+360 a^3 b B+336 a b^3 B+15 a^4 (5 A+6 C)+10 a^2 b^2 (49 A+66 C)\right )-3 b^2 \left (72 a b B+24 b^2 (2 A+5 C)+5 a^2 (5 A+6 C)\right ) \sec ^2(c+d x)\right ) \, dx-\frac {1}{15} \left (-8 a^4 B-60 a^2 b^2 B-15 b^4 B-20 a b^3 (2 A+3 C)-8 a^3 b (4 A+5 C)\right ) \int \cos (c+d x) \, dx\\ &=\frac {\left (8 a^4 B+60 a^2 b^2 B+15 b^4 B+20 a b^3 (2 A+3 C)+8 a^3 b (4 A+5 C)\right ) \sin (c+d x)}{15 d}+\frac {\left (24 A b^4+360 a^3 b B+336 a b^3 B+15 a^4 (5 A+6 C)+10 a^2 b^2 (49 A+66 C)\right ) \cos (c+d x) \sin (c+d x)}{240 d}+\frac {a \left (4 A b^3+16 a^3 B+36 a b^2 B+a^2 b (39 A+50 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {\left (12 A b^2+48 a b B+5 a^2 (5 A+6 C)\right ) \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{120 d}+\frac {(2 A b+3 a B) \cos ^4(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d}+\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}-\frac {1}{16} \left (-24 a^3 b B-32 a b^3 B-8 b^4 (A+2 C)-12 a^2 b^2 (3 A+4 C)-a^4 (5 A+6 C)\right ) \int 1 \, dx\\ &=\frac {1}{16} \left (24 a^3 b B+32 a b^3 B+8 b^4 (A+2 C)+12 a^2 b^2 (3 A+4 C)+a^4 (5 A+6 C)\right ) x+\frac {\left (8 a^4 B+60 a^2 b^2 B+15 b^4 B+20 a b^3 (2 A+3 C)+8 a^3 b (4 A+5 C)\right ) \sin (c+d x)}{15 d}+\frac {\left (24 A b^4+360 a^3 b B+336 a b^3 B+15 a^4 (5 A+6 C)+10 a^2 b^2 (49 A+66 C)\right ) \cos (c+d x) \sin (c+d x)}{240 d}+\frac {a \left (4 A b^3+16 a^3 B+36 a b^2 B+a^2 b (39 A+50 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {\left (12 A b^2+48 a b B+5 a^2 (5 A+6 C)\right ) \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{120 d}+\frac {(2 A b+3 a B) \cos ^4(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d}+\frac {A \cos ^5(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.57, size = 432, normalized size = 1.16 \[ \frac {45 a^4 A \sin (4 (c+d x))+5 a^4 A \sin (6 (c+d x))+300 a^4 A c+300 a^4 A d x+100 a^4 B \sin (3 (c+d x))+12 a^4 B \sin (5 (c+d x))+30 a^4 C \sin (4 (c+d x))+360 a^4 c C+360 a^4 C d x+400 a^3 A b \sin (3 (c+d x))+48 a^3 A b \sin (5 (c+d x))+120 a^3 b B \sin (4 (c+d x))+1440 a^3 b B c+1440 a^3 b B d x+320 a^3 b C \sin (3 (c+d x))+180 a^2 A b^2 \sin (4 (c+d x))+2160 a^2 A b^2 c+2160 a^2 A b^2 d x+480 a^2 b^2 B \sin (3 (c+d x))+2880 a^2 b^2 c C+2880 a^2 b^2 C d x+120 \sin (c+d x) \left (5 a^4 B+4 a^3 b (5 A+6 C)+36 a^2 b^2 B+8 a b^3 (3 A+4 C)+8 b^4 B\right )+15 \sin (2 (c+d x)) \left (a^4 (15 A+16 C)+64 a^3 b B+96 a^2 b^2 (A+C)+64 a b^3 B+16 A b^4\right )+320 a A b^3 \sin (3 (c+d x))+1920 a b^3 B c+1920 a b^3 B d x+480 A b^4 c+480 A b^4 d x+960 b^4 c C+960 b^4 C d x}{960 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.94, size = 292, normalized size = 0.78 \[ \frac {15 \, {\left ({\left (5 \, A + 6 \, C\right )} a^{4} + 24 \, B a^{3} b + 12 \, {\left (3 \, A + 4 \, C\right )} a^{2} b^{2} + 32 \, B a b^{3} + 8 \, {\left (A + 2 \, C\right )} b^{4}\right )} d x + {\left (40 \, A a^{4} \cos \left (d x + c\right )^{5} + 128 \, B a^{4} + 128 \, {\left (4 \, A + 5 \, C\right )} a^{3} b + 960 \, B a^{2} b^{2} + 320 \, {\left (2 \, A + 3 \, C\right )} a b^{3} + 240 \, B b^{4} + 48 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \cos \left (d x + c\right )^{4} + 10 \, {\left ({\left (5 \, A + 6 \, C\right )} a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2}\right )} \cos \left (d x + c\right )^{3} + 32 \, {\left (2 \, B a^{4} + 2 \, {\left (4 \, A + 5 \, C\right )} a^{3} b + 15 \, B a^{2} b^{2} + 10 \, A a b^{3}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left ({\left (5 \, A + 6 \, C\right )} a^{4} + 24 \, B a^{3} b + 12 \, {\left (3 \, A + 4 \, C\right )} a^{2} b^{2} + 32 \, B a b^{3} + 8 \, A b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.37, size = 1578, normalized size = 4.24 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.69, size = 431, normalized size = 1.16 \[ \frac {A \,a^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {4 A \,a^{3} b \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+\frac {a^{4} B \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+6 A \,a^{2} b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+4 B \,a^{3} b \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+a^{4} C \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {4 a A \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 a^{2} b^{2} B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\frac {4 a^{3} b C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+A \,b^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 B a \,b^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 C \,a^{2} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,b^{4} \sin \left (d x +c \right )+4 C a \,b^{3} \sin \left (d x +c \right )+C \,b^{4} \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 415, normalized size = 1.12 \[ -\frac {5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 64 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} B a^{4} - 30 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{4} - 256 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A a^{3} b - 120 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} b + 1280 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{3} b - 180 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} b^{2} + 1920 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{2} b^{2} - 1440 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} b^{2} + 1280 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a b^{3} - 960 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{3} - 240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A b^{4} - 960 \, {\left (d x + c\right )} C b^{4} - 3840 \, C a b^{3} \sin \left (d x + c\right ) - 960 \, B b^{4} \sin \left (d x + c\right )}{960 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.14, size = 534, normalized size = 1.44 \[ \frac {5\,A\,a^4\,x}{16}+\frac {A\,b^4\,x}{2}+\frac {3\,C\,a^4\,x}{8}+C\,b^4\,x+2\,B\,a\,b^3\,x+\frac {3\,B\,a^3\,b\,x}{2}+\frac {5\,B\,a^4\,\sin \left (c+d\,x\right )}{8\,d}+\frac {B\,b^4\,\sin \left (c+d\,x\right )}{d}+\frac {9\,A\,a^2\,b^2\,x}{4}+3\,C\,a^2\,b^2\,x+\frac {15\,A\,a^4\,\sin \left (2\,c+2\,d\,x\right )}{64\,d}+\frac {3\,A\,a^4\,\sin \left (4\,c+4\,d\,x\right )}{64\,d}+\frac {A\,a^4\,\sin \left (6\,c+6\,d\,x\right )}{192\,d}+\frac {A\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {5\,B\,a^4\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}+\frac {B\,a^4\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {C\,a^4\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^4\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {A\,a\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{3\,d}+\frac {5\,A\,a^3\,b\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {A\,a^3\,b\,\sin \left (5\,c+5\,d\,x\right )}{20\,d}+\frac {B\,a\,b^3\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {B\,a^3\,b\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {B\,a^3\,b\,\sin \left (4\,c+4\,d\,x\right )}{8\,d}+\frac {9\,B\,a^2\,b^2\,\sin \left (c+d\,x\right )}{2\,d}+\frac {C\,a^3\,b\,\sin \left (3\,c+3\,d\,x\right )}{3\,d}+\frac {3\,A\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {3\,A\,a^2\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{16\,d}+\frac {B\,a^2\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{2\,d}+\frac {3\,C\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {3\,A\,a\,b^3\,\sin \left (c+d\,x\right )}{d}+\frac {5\,A\,a^3\,b\,\sin \left (c+d\,x\right )}{2\,d}+\frac {4\,C\,a\,b^3\,\sin \left (c+d\,x\right )}{d}+\frac {3\,C\,a^3\,b\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________